package com.schoolET.entity.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author: lin
 * @className: NewsInfoVO
 * @createTime: 2024-06-02  20:11
 * @description: 新闻信息VO
 */
@Data
@ApiModel(value = "NewsVO对象", description = "查询新闻")
public class NewsInfoVO {

    @ApiModelProperty(value = "id")
    private Integer id;

    @ApiModelProperty(value = "主题")
    private String theme;

    @ApiModelProperty(value = "地址")
    private String position;

    @ApiModelProperty(value = "创建时间")
    private String createTime;

    @ApiModelProperty(value = "页数",required = true)
    private Integer pageNum;

    @ApiModelProperty(value = "条数",required = true)
    private Integer pageSize;


    public Integer getPageNum() {
        return (this.pageNum == null || this.pageNum < 1) ? this.pageNum = 1 : this.pageNum;
    }

    public Integer getPageSize() {
        return (this.pageSize == null || this.pageSize < 1) ? 5 : this.pageSize;
    }

}
